#define _CRT_SECURE_NO_WARNINGS
int stack[300];
int count = 0;

void push(int value) {
    stack[count++] = value;
    printf("stack[%d]=%d\n", count - 1, stack[count - 1]);
}

void pop() {
    if (count == 0)
    {
        return;
    }
    count--;
}

int top() {
    return stack[count - 1];
}

int min() {
    //write code here
    if (count == 0)
    {
        return -1;
    }
    int min = stack[0];
    for (int i = 0; i < count; i++)
    {
        if (min > stack[i])
        {
            min = stack[i];
        }
    }
    return min;
}